<?php


namespace App\Http\Util;

use Illuminate\Support\Facades\Mail;

class MailController extends Mail
{
    public function send()
    {
        try {
            $name = '我发的第一份邮件';
            Mail::raw('测试', function ($message) {
                $to = 'xsww123123@163.com';
                $message->to($to)->subject('邮件测试');
            });
        } catch (\Exception $e) {
            if (count(Mail::failures()) > 0) {
                return $name;
            }
        }

    }
}
